#ifndef TD_WAVE_INFO_PANEL_H_
#define TD_WAVE_INFO_PANEL_H_

/************************************************************************/
/* STL                                                                  */
/************************************************************************/
#include <deque>

/************************************************************************/
/* Core                                                                 */
/************************************************************************/
#include "Core/Utils.h"

/************************************************************************/
/* GUI                                                                  */
/************************************************************************/
#include "GUI/Panels/BasePanel.h"

/************************************************************************/
/* Resources                                                            */
/************************************************************************/
#include "Resources/ResourceManager.h"
#include "Resources/Tiles/Tile.h"


using namespace std;
using namespace boost;

namespace TD_GUI {

	class WaveInfoPanel : public BasePanel {

		/************************************************************************/
		/* Default definitions                                                  */
		/************************************************************************/
		static const string WaveInfoPanelBackground;
		static const Coord2D WaveInfoPanelPosition;
		static const Coord2D WaveInfoPanelSize;
		static const string waveBaseName;
		static const unsigned int numberOfWaves;
		static const float barVelocity;

		unsigned int m_currWave;

		deque<Tile * > m_wavesTiles;
		deque<SDL_Rect * > m_wavesClips;

		float m_displacement;

		bool m_isRolling;


		string waveName(unsigned int waveIndex);

		void update(unsigned int deltaTime);
	public:


		/************************************************************************/
		/* ctors and dtors					                                    */
		/************************************************************************/
		//Default constructor
		explicit WaveInfoPanel();

		//Copy constructor
		explicit WaveInfoPanel(const WaveInfoPanel &rhs);

		//Assignment constructor
		WaveInfoPanel& operator=(const WaveInfoPanel &rhs);

		//Destructor
		~WaveInfoPanel();

		/************************************************************************/
		/* Rendering                                                            */
		/************************************************************************/
		void render(SDL_Surface *const g_destSurface, unsigned int deltaTime);

		interaction_t processEvent(const SDL_Event &event);

		void restart();

		void startNextWave();
		
		inline void startRolling() { m_isRolling = true; }
		inline void stopRolling() { m_isRolling = false; }

		inline bool isRolling() const { return m_isRolling; }

		inline unsigned int getCurrentWave() const {
			return m_currWave;
		} 

		
	};
}


#endif